a48a87e780a007645d43eb64ea7d990066be4c8b,core/baseLanguage/baseLanguage/source_gen/jetbrains/mps/baseLanguage/javastub/ClassifierUpdater.java,ClassifierUpdater,updateTypeVariables,#ASMMethod#SModel#BaseMethodDeclaration#Classifier#,168
Before Change
private void updateTypeVariables(ASMMethod method, SModel model, BaseMethodDeclaration result, Classifier cls) {
Map<ASMTypeVariable, TypeVariableDeclaration> typeVars = new HashMap<ASMTypeVariable, TypeVariableDeclaration>();
for (ASMTypeVariable tv : method.getTypeParameters()) {
TypeVariableDeclaration typeVariableDeclaration = TypeVariableDeclaration.newInstance(model);
typeVariableDeclaration.setName(tv.getName());
result.addTypeVariableDeclaration(typeVariableDeclaration);
typeVars.put(tv, typeVariableDeclaration);
}
for (ASMTypeVariable tv : method.getTypeParameters()) {
TypeVariableDeclaration typeVariableDeclaration = typeVars.get(tv);
if (tv instanceof ASMFormalTypeParameter) {
ASMFormalTypeParameter tp = (ASMFormalTypeParameter) tv;
if (tp.getClassBound() != null) {
typeVariableDeclaration.setBound(getTypeByASMType(tp.getClassBound(), result, cls, model));
}
for (ASMType act : tp.getInterfaceBounds()) {
typeVariableDeclaration.addAuxBounds((ClassifierType) getTypeByASMType(act, result, cls, model));
}
}
}
After Change
private void updateTypeVariables(ASMClass cls, SNode result) {
for (ASMTypeVariable tv : cls.getTypeParameters()) {
SNode tvd = new ClassifierUpdater.QuotationClass_ol94f8_a0a0a0a1().createNode(tv.getName());
ListSequence.fromList(SLinkOperations.getTargets(result, "typeVariableDeclaration", true)).addElement(tvd);
if (tv instanceof ASMFormalTypeParameter) {
ASMFormalTypeParameter tp = (ASMFormalTypeParameter) tv;
if (tp.getClassBound() != null) {
SLinkOperations.setTarget(tvd, "bound", getTypeByASMType(tp.getClassBound(), null, result), true);
}
for (ASMType act : tp.getInterfaceBounds()) {
ListSequence.fromList(SLinkOperations.getTargets(tvd, "auxBounds", true)).addElement(SNodeOperations.cast(getTypeByASMType(act, null, result), "jetbrains.mps.baseLanguage.structure.ClassifierType"));
}
}
}